<template>
  <div class="site-aside-container">
    <template v-if="data">
      <div class="avatar">
        <Avatar :url="data.avatar" :size="150" />
      </div>
      <h1 class="title">{{ data.siteTitle }}</h1>
    </template>
    <Menu />
    <Contact v-if="data" />
    <footer v-if="data" class="footer">{{ data.icp }}</footer>
  </div>
</template>

<script>
import Avatar from "@/components/Avatar";
import Menu from "./Menu";
import Contact from "./Contact";
import { mapState } from "vuex";
export default {
  components: {
    Avatar,
    Menu,
    Contact,
  },
  computed: mapState("setting", ["data"]),
};
</script>

<style lang="less" scoped>
@import "~@/styles/var.less";

.site-aside-container {
  width: 100%;
  height: 100%;
  background: @dark;
  padding: 20px 0;
  box-sizing: border-box;
  overflow-x: hidden;
  overflow-y: auto;
  scroll-behavior: hidden;
  .avatar {
    width: 150px;
    margin: 0 auto;
  }
  .title {
    color: #fff;
    font-size: 1.2em;
    font-weight: bold;
    text-align: center;
    margin: 12px 0;
  }
  .footer {
    font-size: 12px;
    text-align: center;
  }
  // 隐藏滚动条, 但可滚动
  &::-webkit-scrollbar {
    display: none;
  }
}
</style>
